#ifndef _XX_YY_BMOCK_ARG_CHECKER
#define _XX_YY_BMOCK_ARG_CHECKER

#include <boost/signals2.hpp>
#include <string>
#include "bmock_raw_mem_checker.hpp"

namespace bmock {
	struct arg_checker : public raw_mem_checker {
		typedef boost::signals2::signal<void ()> sig_type;
		typedef sig_type::slot_type    slot_type;

		arg_checker(const control_tools_ptr tl)
			:raw_mem_checker(tl)
		{}
		virtual bool check_arg(const std::string &name,const std::string &exp,const std::string &act) const;
		virtual bool check_ptr(const std::string &name,bool null_expected,bool null_supplied) const;
		virtual bool check_arg_no_msg(const std::string &name,const std::string &exp,const std::string &act) const;
		virtual bool check_ptr_no_msg(const std::string &name,bool null_expected,bool null_supplied) const;
		bool check_arg_no_throw(const std::string &name,const std::string &exp,const std::string &act) const;
		bool check_ptr_no_throw(const std::string &name,bool null_expected,bool null_supplied) const;
		void update_failed(const std::string &name) const;
		bool check_failed(const std::string &name) const;
		void connect(const slot_type &slot) {
			sig_.connect(slot);
		}
		void invoke_callbacks() const {
			sig_();
		}
	private:
		sig_type sig_;
	};
}
#endif
